Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

230
Views
I want to ignore "\" in the dynamic value

When i am launching the web application it is generating a state token which is dynamic value looks like this"State_token_g0=stateToken = '00aF\x2D5HSbtfsCjJbYUAayevCC5uvH9Qg5aMGSUvKEM';" and it is getting failed and throwing an error as"{"errorCode":"E0000003","errorSummary":"The request body was not well-formed.","errorLink":"E0000003","errorId":"oaewNC2ocVjS6m_EpiszsjV7Q","errorCauses":[]}". If the dynamic value generated without "" it is getting executed. it is not possible to delete \ from the library as well. Tried multiple regex ^[a-zA-Z0-9]+$, [^"]+?, \d+?,\w+?, {"stateToken":([^"]+?),^[A-Z0-9a-z\~!@#$%^&()_+|,./<>?]+$,[A-Z0-9a-z\], ^[A-Z0-9a-z\]+$

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

replace(/\\/g, ''); 

will replace backslashes, could you add this to your regex?

let string = "00aF\x2D5HSbtfsCjJbYUAayevCC5uvH9Qg5aMGSUvKEM";
var minusbackslash = string.replace(/\\/g, '');

//show result in result div
document.getElementById("result").innerText = minusbackslash;
<div id="result"></div>

about 4 years ago · Juan Pablo Isaza Report

0

You can remove backslashes by adding a JSR223 PostProcessor after your Regular Expression Extractor and using the following code in the "Script" area:

vars.put('State_token_g0', vars.get('State_token_g0').replaceAll('\\\\',''))

The line will replace the original value of the State_token_g0 JMeter Variable with the removed slashes.

Demo:

enter image description here

In the above example vars stands for JMeterVariables class instance, see the JavaDoc for full description of all functions and fields and Top 8 JMeter Java Classes You Should Be Using with Groovy article for more details on this and other JMeter API shorthands available for the JSR223 Test Elements

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!